<?php 
/*include  "./../protected.php"; /*Valida el inico de sesion*/
?>
<!DOCTYPE html>
<head>
<link href="ceGrid.css" rel="stylesheet" type="text/css">
<link href="main.css" rel="stylesheet" type="text/css">
<meta charset="UTF-8">
</head>


<button class ="btn" id= "atras" type="button" onclick="javascript: location.href='../Menu.php'">Regresar al Menú</button>


<body>
<div id="content">
<?php
/*
$host = "74.220.207.160";
$usuario = "repuest3_genesys";
$clave = "1q2w3e4r5t6y";*/

$host = "localhost";
$usuario ="root";
$clave = "root";
error_reporting(0);
require 'dg/ceSQL.php';
require 'dg/ceGrid.php';

$dbase = new ceMySQLAdap($host,$usuario, $clave,"ga");

$dg = new ceDataGrid($dbase); 

$dg->setQuery("GA07CODE,GA07DEDE","ga07depart");

$dg->allowFilters();

$dg->showCreateButton("href='mt01.php'", ceDataGrid::TYPE_ONCLICK, 'Agregar');
$dg->setResultsPerPage(10);

$dg->setColumnHeader('GA07CODE', 'CODIGO');
$dg->setColumnHeader('GA07DEDE', 'DESCRIPCION');

$dg->addStandardControl(ceDataGrid::STDCTRL_EDIT, "href='mt02.php?id=%GA07CODE%'");
$dg->addStandardControl(ceDataGrid::STDCTRL_DELETE, "href='delete.php?id=%GA07CODE%'");

$dg->showReset("Refrescar");
$dg->printTable();
?>
</div>
</body>
</html>